import request from '@/utils/request'

// 查询四色图
export function listpc(query) {
  return request({
    url: '/aqsc/photo/list',
    method: 'get',
    params: query
  })
}
// 新增四色图
export function addPhoto(add) {
  return request({
    url: '/aqsc/photo/add',
    method: 'post',
    data: add
  })
}
// 查询四色图详细
export function getPhoto(id) {
  return request({
    url: '/aqsc/photo/' + id,
    method: 'get'
  })
}
// 修改四色图
export function updatePhoto(data) {
  return request({
    url: '/aqsc/photo/update',
    method: 'put',
    data: data
  })
}
//导出
// 删除四色图
export function delPhoto(id) {
  return request({
    url: '/aqsc/photo/deletes/' + id,
    method: 'delete'
  })
}



//图片上传
export function uploadFile(data) {
  return request({
    url: '/file/upload', //后端提供的接口
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}


//图片上传
export function uploadAvatar(data) {
  return request({
    url: '/aqsc/photo/avatar',
    method: 'post',
    data: data
  })
}
